package com.biboheart.adapter.express.support;

import com.biboheart.adapter.express.operation.Logical;
import com.biboheart.adapter.support.utils.ObjectTypeUtils;

final class LogicalAndCalculate implements Logical {
    @Override
    public Boolean calc(Object left, Object right) {
        if (!(left instanceof Boolean) || !(right instanceof Boolean)) {
            return false;
        }
        return ObjectTypeUtils.convertType(left, Boolean.class) && ObjectTypeUtils.convertType(right, Boolean.class);
    }

    @Override
    public Boolean calc(Boolean source) {
        return false;
    }
}
